package repositories;

import java.util.Collection;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import domain.Reunion;

@Repository
public interface ReunionRepository extends JpaRepository<Reunion, Integer>{

	@Query("select c.reuniones from ComunidadDeVecinos c where c.id = ?1")
	Collection<Reunion> findByCommunity(int communityId);
}
